#define PIC1		0x20		/* IO base address for master PIC */
#define PIC2		0xA0		/* IO base address for slave PIC */
#define PIC1_COMMAND	PIC1
#define PIC1_DATA	(PIC1+1)
#define PIC2_COMMAND	PIC2
#define PIC2_DATA	(PIC2+1)
#define PIC_EOI		0x20		/* End-of-interrupt command code */

#include <gtubs/arch/x86/PIC.hpp>
#include <gtubs/arch/x86/io.hpp>

void PIC::init()
{
    remapIRQs();
}

void PIC::sendEOI(unsigned char irq)
{
	if(irq >= 8)
		outb(PIC2_COMMAND,PIC_EOI);
	outb(PIC1_COMMAND,PIC_EOI);
}

void PIC::disable()
{
    outb(0xa1, 0xff);
    outb(0x21, 0xff);
}

void PIC::remapIRQs()
{
    ;
}
